package com.xiaoma.reactor;

import org.reactivestreams.Subscription;
import reactor.core.publisher.BaseSubscriber;

public class MySubscriber extends BaseSubscriber {
    @Override
    protected void hookOnSubscribe(Subscription subscription) {
        System.out.println("订阅开始！");
        request(1);
    }

    @Override
    protected void hookOnNext(Object value) {
        System.out.println("获取当前元素成功！" + value);
        request(1);
    }
}
